// richView.h : interface of the CRichView class
//


#pragma once

namespace EditRich{
class CRichCntrItem;

class CRichView : public CRichEditView
{
protected: // create from serialization only
	CRichView();
	DECLARE_DYNCREATE(CRichView)

// Attributes
public:
	CRichDoc* GetDocument() const;

// Operations
public:
	int   IsSomeAttr(DWORD attr, DWORD effect);
	void  SetSomeAttr(DWORD attr, DWORD effect);
	void  SetColor(COLORREF color);

// Overrides
	public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
	virtual void OnInitialUpdate(); // called first time after construct
	virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);

// Implementation
public:
	virtual ~CRichView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	afx_msg void OnDestroy();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg void OnFormatBold();
	afx_msg void OnUpdateFormatBold(CCmdUI* pCmdUI); 
	afx_msg void OnFormatItalic();
	afx_msg void OnUpdateFormatItalic(CCmdUI* pCmdUI); 
	afx_msg void OnFormatUnderline();
	afx_msg void OnUpdateFormatUnderline(CCmdUI* pCmdUI); 
	afx_msg void OnFormatStrikeout();
	afx_msg void OnUpdateFormatStrikeout(CCmdUI* pCmdUI); 
};

#ifndef _DEBUG  // debug version in richView.cpp
inline CRichDoc* CRichView::GetDocument() const
   { return reinterpret_cast<CRichDoc*>(m_pDocument); }
#endif
};
